<template>
    <show-modal :title="title" :loading="loading" width="800px" @cancel="cancel" :isSure="false">
        <!-- <table-list
            :loading="loading"
            :columns="columns"
            rowKey="jarId"
            :data="list"
            />
        <div class="control_box flex-row">
            <a-button type="primary">平台配置同步</a-button>
            <a-button class="btn_space">设备配置刷新</a-button>
        </div> -->
        <property-box :info="info" :property="list" :isEdit="false" :deviceCode="info.deviceCode" :pro-code="info.pdtCode" />
    </show-modal>
</template>
<script>
import TableList from '@/components/standardTable'
import PropertyBox from '@/views/components/productDetails/property';
export default {
    name:'MonitorControl',
    components:{
        TableList,
        PropertyBox
    },
    props:{
        info:{
            type:Object,
            default:()=>{}
        }
    },
    data(){
        return {
            title:"",
            loading:false,
            columns:[
                {
                    title: '参数',
                    dataIndex: 'alarmType',
                    scopedSlots: { customRender: 'alarmType' },
                    align: 'center',
                },
                {
                    title: '平台值',
                    dataIndex: 'alarmName',
                    align: 'center',
                },
                {
                    title: '更新时间',
                    dataIndex: 'deviceCode',
                    scopedSlots: { customRender: 'deviceName' },
                    width:160,
                    align: 'center',
                },
            ],
            list:[]
        }
    },
    created(){
        let {jarName,jarCode,deviceCode} = this.info;
        console.log(this.info)
        this.title = `${jarName}操作`
    },
    methods:{
        cancel(){
            this.$emit('cancel')
        },
    }
}
</script>
<style lang="scss" scoped>
.control_box{
    justify-content: flex-end;
}
</style>